<?php 

class AppController extends CI_Controller{
	
	public function __construct(){
		
		parent::__construct();
		
		if(!$this->session->userdata('dados') && $this->uri->segment(1) != 'login')
		{
			redirect('login');
		}
		
	}	
	
}